<!--
 * @description: 
 * @Author: lhr
 * @Date: 2020-12-23 15:20:35
 * @LastEditors: lhr
 * @LastEditTime: 2020-12-23 16:25:01
-->
<template>
    <!-- <div> -->
        <!-- <p :class="$attrs.class">{{ text }}</p> -->
        <p>{{ text }}</p>
        <slot></slot>
        <button @click="ok">ok</button>
    <!-- </div> -->
</template>
<script>
export default {
  props: {
    text: String,
  },
  setup(props,context) {
    console.log(props.text,context);
    console.log('context.attrs',context.attrs);
    console.log('context.slots',context.slots.default());
    console.log('context.emit',context.emit);

    function ok(){
        context.emit('ok')
    }
    return {
        ok
    }
  },
};
</script>
